//
//  HJGlobalFunction.h
//  KaiChat
//
//  Created by lx on 2023/10/16.
//

#import <Foundation/Foundation.h>
#import "HJMainController.h"

extern UIFont * UIFontUltraLightMake(CGFloat size);
extern UIFont * UIFontThinMake(CGFloat size);
extern UIFont * UIFontLightMake(CGFloat size);
extern UIFont * UIFontMake(CGFloat size);
extern UIFont * UIFontMediumMake(CGFloat size);
extern UIFont * UIFontSemiboldMake(CGFloat size);
extern UIFont * UIFontBoldMake(CGFloat size);

extern UIColor * UIColorMake(int hex);
extern UIColor * UIColor_RGB(CGFloat R, CGFloat G, CGFloat B);
extern UIColor * UIColor_RGBA(CGFloat R, CGFloat G, CGFloat B, CGFloat A);
 
extern HJMainController *getMainController(void);
extern UIWindow *getMainWindow(void);

extern void dispatch_safe_queue(void (^execute)(void));
extern void dispatch_async_queue(void (^execute)(void));
extern void dispatch_async_main_queue(void (^execute)(void));
extern void dispatch_async_global_queue(void (^execute)(void));
extern void dispatch_async_serial_queue(void (^execute)(void));
extern void dispatch_async_sql_queue(void (^execute)(void));
extern void dispatch_after_main_queue(int64_t timeInterval, void (^execute)(void));
extern void dispatch_after_global_queue(int64_t timeInterval, void (^execute)(void));

extern NSString *HJBase64EncodedStringFromString(NSString *string);
extern NSString * HJContentTypeForPathExtension(NSString *extension);
extern NSRange HJMakeRange(NSInteger totalCount, NSInteger pageIndex, NSInteger pageSize);
extern NSComparisonResult compareNumberValue(NSString *value1, NSString *value2);
extern long long getSizeInBytesByPath(NSString *localPath);
extern BOOL isEmptyString(NSString *string);
extern NSString *getCameraCoverPath(NSString *cameraNo, NSString *deviceKey);
extern AFHTTPSessionManager * getHTTPSessionManager(void);
extern AFHTTPSessionManager * getBodyJsonHTTPSessionManager(void);
extern BOOL TJIM_isSelf(NSString *userId);
extern NSString *getMessageId(void);
extern unsigned long long getFileSizeAtPath(NSString *path);
extern void deleteFindeFileAtPath(NSString *path);
extern NSString *getFileNameWithPathExtension(NSString *pathExtension);
extern CGSize getThumbnailImageSize(CGSize imageSize, CGFloat limit);
extern NSString *getUploadImagePath(NSString *imageName);
extern NSData * HJMakePacketData(NSData *header, NSData *bodyData);
extern NSString *getUploadFileKey(HJFileType type, NSString *fileName);
extern NSData * getThumbnailWithImage(UIImage *image, CGSize maxImageSize);
extern NSString *getUrlPath(NSString *url);
extern NSString *toString(id value);
extern NSDictionary *safeDict(id value);
extern NSArray *safeArray(id value);
extern NSString *safeString(id value);
